package kr.ac.skhu.m.service;

import java.sql.SQLException;

import kr.ac.skhu.m.dao.CommentD;
import kr.ac.skhu.m.domain.Comment;

import org.springframework.jdbc.core.JdbcTemplate;

public class CommentS extends JdbcTemplate {
	
	private CommentD commentD;
	
	public void setCommentD(CommentD commentD) {
		this.commentD = commentD;
	}

	public int insertComment(Comment comment) {
		
		int result = 0;
		
		try {
			result = commentD.insertComment(comment);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
		return result;
	}
	
}
